class CreateAttendances < ActiveRecord::Migration
  def change
    create_table :attendances do |t|
      t.references :student
      t.references :tclass
      t.integer :state
      t.string :description

      t.timestamps
    end
    add_index :attendances, :student_id
    add_index :attendances, :tclass_id
  end
end
